package com.springTest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @Author: YLBG-YCY-1325
 * @Description:
 * @Date: 2017/7/28
 */
@Component("cDplayer")
public class CDplayer {
    private CompactDisc sgtPepper;


    public CDplayer(CompactDisc sgtPepper) {
        this.sgtPepper = sgtPepper;
    }
    @Autowired
    public void test(CompactDisc sgtPepper){
        System.out.println("test 方法 驻入");
        this.sgtPepper = sgtPepper;
    }
    @Autowired
    public void test2(CompactDisc sgtPepper){
        System.out.println("test2 方法驻入");
        this.sgtPepper = sgtPepper;
    }

    public CompactDisc getSgtPepper() {
        return sgtPepper;
    }

    public void setSgtPepper(CompactDisc sgtPepper) {
        this.sgtPepper = sgtPepper;
    }
}
